package com.company.cloud.user.modules.api.fallback;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.user.modules.api.request.*;
import com.company.cloud.user.modules.api.response.AuthUrlConfigQueryResp;
import com.company.cloud.user.modules.api.response.AuthUrlConfigResp;
import com.company.cloud.user.modules.api.response.UserBaseResp;
import com.company.cloud.user.modules.api.service.UrlAuthPlatformRemoteService;
import feign.hystrix.FallbackFactory;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

@Log4j2
@Component
public class UrlAuthPlatformRemoteServiceFallbackFactory implements FallbackFactory<UrlAuthPlatformRemoteService> {
    @Override
    public UrlAuthPlatformRemoteService create(Throwable cause) {
        return new UrlAuthPlatformRemoteService() {
            @Override
            public BaseClientResult<String> addAuthUrlConfigBatch(ServiceUrlConfigAddRequest params) {
                return BaseClientResult.callbackError();
            }

            @Override
            public BaseClientResult<String> initAuthUrlConfigCache() {
                return BaseClientResult.callbackError();
            }

            @Override
            public BaseClientResult<AuthUrlConfigQueryResp> queryAuthUrlConfig(AuthUrlConfigQueryRequest request) {
                return BaseClientResult.callbackError();
            }

            @Override
            public BaseClientResult<AuthUrlConfigResp> addAuthUrlConfig(AuthUrlConfigAddRequest request) {
                return BaseClientResult.callbackError();
            }

            @Override
            public BaseClientResult<AuthUrlConfigResp> updateAuthUrlConfig(AuthUrlConfigUpdateRequest request) {
                return BaseClientResult.callbackError();
            }

            @Override
            public BaseClientResult<AuthUrlConfigResp> getAuthUrlConfig(AuthUrlConfigGet2DelRequest request) {
                return BaseClientResult.callbackError();
            }

            @Override
            public BaseClientResult<String> delAuthUrlConfig(AuthUrlConfigGet2DelRequest request) {
                return BaseClientResult.callbackError();
            }
        };
    }
}
